package designpattern.Decorator;

/**
 * @author cyt
 * @create 2020-07-20 10:37
 */

/**
 * 新建一个装饰者来装饰 组件
 *
 * @author Administrator
 */
public class Whilte extends BaseCondimentDecorator {

    public BaseCoffee coffee;

    public Whilte(BaseCoffee coffee) {
        this.coffee = coffee;
    }

    @Override
    public String getDescription() {
        return coffee.getDescription() + "whilte ";

    }

    @Override
    public double cost() {
        return coffee.cost() + 2.0;
    }
}
